﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PwjCy.Lite.EntityLite.Imp
{
    /// <summary>
    /// 类型服务
    /// </summary>
    public class TypeService : ITypeService
    {
        public IPwjCyObject CreateInstance(Type type)
        {
            return (IPwjCyObject)Activator.CreateInstance(type);
        }
        public IPwjCyObject CreateInstance(Type type, string storageAlias)
        {
            IPwjCyObject pwjcyObject = CreateInstance(type);
            ((PwjCyObject)pwjcyObject).SetStorageAlias(storageAlias);
            return pwjcyObject;
        }
    }
}
